Comments are created by writing text
● after double slash "//" for single line Comments //Single line comment
● between "/* ... */" for multi-line Comments /* Multi line comment*/
Comment Syntax
public class Test {
public static void main(String[] args) {
//Single line comment
String name = "John";
/* Multi line comment.
Second line. */
System.out.println("Hello " + name);
}
}